﻿using LY.DataAccess.Repository;
using LY.Entity;
using LY.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LY.Business.ServiceImpl
{
    public class CompanyAnnexService : ICompanyAnnexService
    {
        CompanyAnnexRepository _companyAnnex;
        public CompanyAnnexService()
        {
            _companyAnnex = new CompanyAnnexRepository();
        }
        //根据会员ID查询公司信息
        public U_CompanyAnnex GetCompanyAnnex(int memberId, int companyId)
        {
            return _companyAnnex.GetCompanyAnnex(memberId, companyId);
        }

        //根据公司id  查询公司附件信息
        public U_CompanyAnnex GetCompanyAnnex(int companyId)
        {
            return _companyAnnex.GetCompanyAnnex(companyId);
        }


        //修改and添加公司附件信息
        public int CompanyAnnexSave(U_CompanyAnnex companyAnnex)
        {
            if (companyAnnex.Id > 0)
            {
                return (int)_companyAnnex.Update(companyAnnex);
            }
            else
            {
                return (int)_companyAnnex.Insert(companyAnnex);
            }
        }
       /* //修改附件信息
        public int UpdateCompanyAnnex(String sign,int companyId)
        {
            return _companyAnnex.UpdateCompanyAnnex(sign,companyId);
        }*/


    }
}
